package losrebellos.lospistoleros.events 
{
	import losrebellos.events.EventPlus;

	import flash.events.Event;

	/*
	 *
	 * @author los rebellos - ben@benoitvinay.com
	 *
	 */
	public class PLoadingEvent extends EventPlus 
	{
		/*
		 * 
		 * EVENTS
		 * 
		 */
		public static const PROGRESS:String = "pistoleros/loading/progress";
		public static const COMPLETE:String = "pistoleros/loading/complete";
		public static const ERROR:String = "pistoleros/loading/error";
		//data
		public var percentLoaded:Number = 0;
		
		
		/*
		 *
		 * CONSTRUCTOR
		 *
		 */
		public function PLoadingEvent(type:String, percentLoaded:Number = 0, bubbles:Boolean = false, cancelable:Boolean = false)
		{
			this.percentLoaded = percentLoaded;
			
			super(type, bubbles, cancelable);
		}
		
		
		/*
		 * 
		 * UTILS
		 * 
		 */
		override public function clone():Event
		{
			return new PLoadingEvent(this.type, this.percentLoaded, this.bubbles, this.cancelable);
		}
	}
}
